import request from "@/utils/request";
const BAST_API = "https://www.defihome.xyz/api/";
export default {
    //验证用户名
    getdata(str, name) {
        return request({
            method: "get",
            url: BAST_API + str,
            params: {
                name
            }
        });
    },
    //登录
    getuser(str, body) {
        let {
            name,
            code,
            password
        } = body;
        return request({
            method: "get",
            url: BAST_API + str,
            params: {
                name,
                code,
                password
            }
        });
    },
    //用户注册
    reguser(str, body) {
        let {
            name,
            code,
            password
        } = body;
        return request({
            method: "post",
            url: BAST_API + str,
            data: {
                name,
                code,
                password
            }
        })
    },
    //token验证
    getUserInf(token) {
        return request({
            method: 'get',
            url: BAST_API + 'user/verify',
            params: {
                token
            }
        })
    }
}